﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace QLTV.Reports
{
    public partial class rptTrainingCrewCourse : DevExpress.XtraReports.UI.XtraReport
    {
        public rptTrainingCrewCourse()
        {
            InitializeComponent();

        }

        private void xrLabel1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {

        }
        int stt = 0;

        public DateTime CreatedDate
        {
            get;
            set;
        }

        public int CourseId
        {
            get;
            set;
        }

        public String CourseName
        {
            get;
            set;
        }

        public String UserExport
        {
            get;
            set;
        }
        private void STTxrTableCell_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            STTxrTableCell.Text = (++stt).ToString();
        }

        public void loadData(int planid)
        {
            lblCourse.Text = this.CourseName;
            this.UserExport = Program.EmployeeName;
            lblUserExport.Text = this.UserExport;
            lblCreatedDate.Text = this.CreatedDate.ToShortDateString();
            tadTrainingPlanDetail.Fill(dsReport1.tblTrainingPlanDetail, planid);
        }

        private void xrTableCell17_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            if (xrTableCell17.Text != "")
            {
                xrTableCell7.Text = xrTableCell17.Text + " Tháng";
            }
        }

    }
}
